<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1">
    <title id="jt142031">gppkg</title>
    <body>
        <p>Installs Greenplum Database extensions in <codeph>.gppkg</codeph> format, such as
            PL/Java, PL/R<ph otherprops="pivotal">, PostGIS</ph>, and MADlib, along with their
            dependencies, across an entire cluster.</p>
        <section id="section2">
            <title>Synopsis</title>
            <codeblock>gppkg [-i &lt;package> | -u &lt;package> | -r  &lt;name>-&lt;version> | -c] 
        [-d &lt;master_data_directory>] [-a] [-v]

gppkg --migrate &lt;GPHOME_old> &lt;GPHOME_new> [-a] [-v]

gppkg [-q | --query] &lt;query_option>

gppkg -? | --help | -h 

gppkg --version</codeblock>
        </section>
        <section id="section3">
            <title>Description</title>
            <p>The Greenplum Package Manager (<codeph>gppkg</codeph>) utility installs Greenplum
                Database extensions, along with any dependencies, on all hosts across a cluster. It
                will also automatically install extensions on new hosts in the case of system
                expansion and segment recovery.</p>
            <note type="note">After a major upgrade to Greenplum Database, you must download and
                install all <codeph>gppkg</codeph> extensions again.</note>
            <p otherprops="pivotal">Examples of database extensions and packages software that are
                delivered using the Greenplum Package Manager are:<ul id="ul_g35_g2j_f1b">
                    <li>PL/Java</li>
                    <li>PL/R</li>
                    <li id="jt141959" otherprops="pivotal">PostGIS</li>
                    <li id="jt142629">MADlib</li>
                </ul></p>
        </section>
        <section id="section4">
            <title>Options</title>
            <parml>
                <plentry>
                    <pt>-a (do not prompt)</pt>
                    <pd>Do not prompt the user for confirmation.</pd>
                </plentry>
                <plentry>
                    <pt>-c | --clean</pt>
                    <pd>Reconciles the package state of the cluster to match the state of the master
                        host. Running this option after a failed or partial install/uninstall
                        ensures that the package installation state is consistent across the
                        cluster.</pd>
                </plentry>
                <plentry>
                    <pt>-d <varname>master_data_directory</varname></pt>
                    <pd>The master data directory. If not specified, the value set for
                            <codeph>$MASTER_DATA_DIRECTORY</codeph> will be used.</pd>
                </plentry>
                <plentry>
                    <pt>-i <varname>package</varname> | --install=<varname>package</varname></pt>
                    <pd>Installs the given package. This includes any pre/post installation steps
                        and installation of any dependencies.</pd>
                </plentry>
                <plentry>
                    <pt>--migrate <varname>GPHOME_old</varname>
                        <varname>GPHOME_new</varname></pt>
                    <pd>Migrates packages from a separate <codeph>$GPHOME</codeph>. Carries over
                        packages from one version of Greenplum Database to another.</pd>
                    <pd>For example: <codeph>gppkg --migrate
                            /usr/local/greenplum-db-&lt;old-version>
                            /usr/local/greenplum-db-&lt;new-version></codeph></pd>
                    <pd>
                        <note>In general, it is best to avoid using the <codeph>--migrate</codeph>
                            option, and packages should be reinstalled, not migrated. See <xref
                                href="../../install_guide/upgrading.html#topic17" format="html" scope="external">Upgrading from 6.x
                                to a Newer 6.x Release</xref>.</note>
                    </pd>
                    <pd>When migrating packages, these requirements must be met.<ul
                            id="ul_sx3_hwx_41b">
                            <li>At least the master instance of the destination Greenplum Database
                                must be started (the instance installed in
                                    <varname>GPHOME_new</varname>). Before running the
                                    <codeph>gppkg</codeph> command start the Greenplum Database
                                master with the command <codeph>gpstart -m</codeph>.</li>
                            <li>Run the <codeph>gppkg</codeph> utility from the
                                    <varname>GPHOME_new</varname> installation. The migration
                                destination installation directory. </li>
                        </ul></pd>
                </plentry>
                <plentry>
                    <pt>-q | --query <varname>query_option</varname></pt>
                    <pd>Provides information specified by <codeph>query_option</codeph> about the
                        installed packages. Only one <codeph>query_option</codeph> can be specified
                        at a time. The following table lists the possible values for query_option.
                            <codeph>&lt;package_file&gt;</codeph> is the name of a package.<table
                            id="jt142509">
                            <title>Query Options for gppkg</title>
                            <tgroup cols="2">
                                <colspec colnum="1" colname="col1" colwidth="144pt"/>
                                <colspec colnum="2" colname="col2" colwidth="165pt"/>
                                <thead>
                                    <row>
                                        <entry colname="col1">query_option</entry>
                                        <entry colname="col2">Returns</entry>
                                    </row>
                                </thead>
                                <tbody>
                                    <row>
                                        <entry colname="col1"
                                            ><codeph>&lt;package_file&gt;</codeph></entry>
                                        <entry colname="col2">Whether the specified package is
                                            installed.</entry>
                                    </row>
                                    <row>
                                        <entry colname="col1"><codeph>--info
                                                &lt;package_file&gt;</codeph></entry>
                                        <entry colname="col2">The name, version, and other
                                            information about the specified package.</entry>
                                    </row>
                                    <row>
                                        <entry colname="col1"><codeph>--list
                                                &lt;package_file&gt;</codeph></entry>
                                        <entry colname="col2">The file contents of the specified
                                            package.</entry>
                                    </row>
                                    <row>
                                        <entry colname="col1"><codeph>--all</codeph></entry>
                                        <entry colname="col2">List of all installed
                                            packages.</entry>
                                    </row>
                                </tbody>
                            </tgroup>
                        </table></pd>
                </plentry>
                <plentry>
                    <pt>-r <varname>name-version</varname> |
                            --remove=<varname>name-version</varname></pt>
                    <pd>Removes the specified package.</pd>
                </plentry>
                <plentry>
                    <pt>-u <varname>package</varname> | --update=<varname>package</varname></pt>
                    <pd>Updates the given package.<note type="warning">The process of updating a
                            package includes removing all previous versions of the system objects
                            related to the package. For example, previous versions of shared
                            libraries are removed. After the update process, a database function
                            will fail when it is called if the function references a package file
                            that has been removed.</note></pd>
                    <pd> </pd>
                </plentry>
                <plentry>
                    <pt>--version (show utility version)</pt>
                    <pd>Displays the version of this utility.</pd>
                </plentry>
                <plentry>
                    <pt>-v | --verbose</pt>
                    <pd>Sets the logging level to verbose.</pd>
                </plentry>
                <plentry>
                    <pt>-? | -h | --help</pt>
                    <pd>Displays the online help.</pd>
                </plentry>
            </parml>
        </section>
    </body>
</topic>
